import 'package:android_location_mocker/MockLocationBean.dart';
import 'package:flutter/services.dart';

class AndroidLocationMocker {
  final methodChannel = const MethodChannel('android_location_mocker');

  Future<bool> isReady() async {
    return await methodChannel.invokeMethod<bool>("isReady") ?? false;
  }

  Future<bool> isOpenDevMode() async {
    return await methodChannel.invokeMethod<bool>("isOpenDevMode") ?? false;
  }

  Future<bool> openDevMode() async {
    return await methodChannel.invokeMethod<bool>("openDevMode") ?? false;
  }

  Future startMock(MockLocationBean map) async {
    methodChannel.invokeMethod<bool>("startMock", map.toJson());
  }

  Future stopMock() async {
    methodChannel.invokeMethod<bool>("stopMock");
  }
}
